package com.rdc.example.dao;

import com.rdc.example.entity.Article;
import com.rdc.example.entity.Comment;

import java.util.List;

/**
 * @author duck
 */
public interface CommentDao {

    boolean insertComment(Comment comment) throws Exception;

    boolean deleteById(Integer id) throws Exception;

    boolean addLike(Integer id) throws Exception;

    boolean reduceLike(Integer id) throws Exception;

    List<Comment> listCommentByArticleId(Integer userId) throws Exception;

    List<Comment> listCommentByArticleIdSortByCreatedAtDesc(Integer articleId) throws Exception;

    List<Comment> listCommentByArticleIdSortByCreatedAtAsc(Integer articleId) throws Exception;
}
